﻿<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
	xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
	xmlns:local="clr-namespace:Debugger.AddIn.Visualizers"
>
	<local:TooltipVisibilityConverter x:Key="TooltipVisibilityConverter"></local:TooltipVisibilityConverter>
	<local:BoolToBoldConverter x:Key="BoolToBoldConverter"></local:BoolToBoldConverter>
	
	
	<DataTemplate x:Key="valueColumnTemplate">
        <TextBlock Text="{Binding Text}" MaxWidth="200">
            <TextBlock.ToolTip>
                <ToolTip 
                        DataContext="{Binding Path=PlacementTarget, RelativeSource={x:Static RelativeSource.Self}}" 
                        Visibility="{Binding Converter={StaticResource TooltipVisibilityConverter}, ConverterParameter=2}">
                    <TextBlock Text="{Binding Text}"></TextBlock>
                </ToolTip>
            </TextBlock.ToolTip>
        </TextBlock>
    </DataTemplate>
	
	<Style TargetType="{x:Type ToggleButton}">
        <Setter Property="Focusable"
          Value="False"/>
        <Setter Property="Width"
          Value="19"/>
        <Setter Property="Height"
          Value="13"/>
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="{x:Type ToggleButton}">
                    <Border Width="19"
                Height="13"
                Background="Transparent">
                        <Border Width="9"
                  Height="9"
                  BorderThickness="1"
                  BorderBrush="#FF7898B5"
                  CornerRadius="1"
                  SnapsToDevicePixels="true">
                            <Border.Background>
                                <LinearGradientBrush StartPoint="0,0"
                                   EndPoint="1,1">
                                    <LinearGradientBrush.GradientStops>
                                        <GradientStop Color="White"
                                Offset=".2"/>
                                        <GradientStop Color="#FFC0B7A6"
                                Offset="1"/>
                                    </LinearGradientBrush.GradientStops>
                                </LinearGradientBrush>
                            </Border.Background>
                            <Path x:Name="ExpandPath"
                  Margin="1,1,1,1"
                  Fill="Black"
                  Data="M 0 2 L 0 3 L 2 3 L 2 5 L 3 5 L 3 3 L 5 3 L 5 2 L 3 2 L 3 0 L 2 0 L 2 2 Z"/>
                        </Border>
                    </Border>
                    <ControlTemplate.Triggers>
                        <Trigger Property="IsChecked"
                   Value="True">
                            <Setter Property="Data"
                    TargetName="ExpandPath"
                    Value="M 0 2 L 0 3 L 5 3 L 5 2 Z"/>
                        </Trigger>
                    </ControlTemplate.Triggers>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
	</Style>
</ResourceDictionary>